/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.base.service.card;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.base.entity.card.BaseCard;
import com.thinkgem.jeesite.modules.base.dao.card.BaseCardDao;

/**
 * 基础管理_借阅证信息生成Service
 * @author 呆子
 * @version 2020-02-22
 */
@Service
@Transactional(readOnly = true)
public class BaseCardService extends CrudService<BaseCardDao, BaseCard> {
    @Autowired
    private BaseCardDao baseCardDao;

	public BaseCard get(String id) {
		return super.get(id);
	}
	
	public List<BaseCard> findList(BaseCard baseCard) {
		return super.findList(baseCard);
	}
	
	public Page<BaseCard> findPage(Page<BaseCard> page, BaseCard baseCard) {
		return super.findPage(page, baseCard);
	}

    public Page<BaseCard> selectCardPage(Page<BaseCard> page, BaseCard baseCard) {
        baseCard.setPage(page);
        page.setList(baseCardDao.selectCardBorNum(baseCard));
        return page;
    }

	@Transactional(readOnly = false)
	public void save(BaseCard baseCard) {
		super.save(baseCard);
	}
	
	@Transactional(readOnly = false)
	public void delete(BaseCard baseCard) {
		super.delete(baseCard);
	}

	public BaseCard findCardByCardId(BaseCard baseCard){
       return baseCardDao.findCardByCardId(baseCard);
    }

}